/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package components.shapemenu;

import Enums.ProjectType;
import PCR.MainFrame;
import components.Band;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;

/**
 *
 * @author icdev
 */
public class ShapeMenuActions implements PopupMenuListener {

    @Override
    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
          MainFrame frm = (MainFrame) java.awt.Window.getWindows()[0];

        if (frm.getSeletedShape() instanceof Band && frm.getSelectedWorkArea().getProjectType() == ProjectType.MRNA) {
            frm.getSelectedWorkArea().getBandsPanel().getShapeMenu().setBrightnessItemAvilabelity(true);

        } else {
            frm.getSelectedWorkArea().getBandsPanel().getShapeMenu().setBrightnessItemAvilabelity(false);
        }
        frm.getSelectedWorkArea().getBandsPanel().getShapeMenu().repaint();
    }

    @Override
    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
         
    }

    @Override
    public void popupMenuCanceled(PopupMenuEvent e) {
       
    }

  
}
